declare global {
  interface Window {
    Slardar: typeof import('@slardar/sdk').default
    loadScript: any
  }
}

export function triggerSlardar() {
  if (window?.Slardar?.shared?.instance.length === 0) {
    return
  }

  window.Slardar('emit', 'timer', {
    name: 'cypress-oncollect',
    value: 1000,
    tags: {
      from: 'cypress-oncollect',
    },
  })

  window.Slardar('emit', 'timer', {
    name: 'cypress-oncollect',
    value: 1000,
    tags: {
      from: 'cypress-oncollect',
    },
  })
}
